package cn.anlaser.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.springframework.data.jpa.domain.AbstractPersistable;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.status.DataEnum;

@MappedSuperclass
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(callSuper = false)
public class CommonEntity extends AbstractPersistable<Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1903848420737426482L;
	@Column(name = "FLAG", length = 10)
	private DataEnum flag;

	@Temporal(TemporalType.TIMESTAMP)
	private Date createdDate;
	private Long createdBy;

}
